package com.xianggu.loadBalancing;

import com.xianggu.protocol.URL;

import java.util.List;

public class LoadBalancer {
    private LoadBalancingStrategy strategy;

    public LoadBalancer(LoadBalancingStrategy strategy) {
        this.strategy = strategy;
    }

    public URL selectServer(List<URL> servers) {
        return strategy.select(servers);
    }
}